#include <stdio.h>

int find(int* arr,int len,int value){
    int low=0,high=len-1,midlle=0;
    while( low <= high){
        midlle=(low+high)/2;
        if(arr[midlle] < value){
            low=midlle+1;
        }else if(arr[midlle] > value){
            high=midlle-1;
        }else{
            return midlle;
        }
    }
    return -1;
}


int main(void){
    int arr[10]={0,1,3,6,9,12,15,16,19,20};
    int len=sizeof(arr)/sizeof(arr[0]);
    int value=0;
    scanf("%d",&value);
    printf("在位置%d\n",find(arr,len,value));
}